package cn.edu.ctbu.ajax514.controller;

import cn.edu.ctbu.ajax514.domain.Student;
import cn.edu.ctbu.ajax514.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Controller
@RequestMapping("/student")
public class StudentController {
    @Autowired
    private StudentService studentService;/**
     * 查询全部学生信息
     * @return
     */
    @GetMapping("/list")
    public List<Student> GetAll(){
        return studentService.findAll();
    }
}
